package com.onepower.core.result;

public enum BizResultCode implements ResultCode {
    MATCH_SCHEDULE_HAS_LOCKED(20001, "已有锁定场次，不能重复锁场"),

    MATCH_SCHEDULE_UNLOCKED_ERROR(20002, "场次解锁失败"),

    MATCH_SCORE_HAS_JUDGE(21001, "不能重复评分"),

    MATCH_SCORE_HAS_NO(21002, "不能没有分数提交"),

    MATCH_SCORE_PULL_FAIL(21003, "本地分数更新失败"),

    REFEREE_DISCONNECT(21004, "裁判已断线"),

    MATCH_SCHEDULE_HAS_NO_SCORE(21005, "上一个场次没完成评分"),

    MATCH_REFEREE_NOT_RIGHT(22001, "裁判数量不匹配"),

    MATCH_PLACE_NO_NULL(22002, "创建场地数量必须大于0"),

    PARENT_ID_IS_NO_EQUAL_SELF(22003, "父级id不能等于自己");


    /**
     * 错误码
     */
    private int code;

    /**
     * 错误信息
     */
    private String msg;

    /**
     * 构造函数
     *
     * @param code 错误码
     * @param msg  错误信息
     */
    BizResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
